const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  chainWebpack: config => {
    config
        .plugin('webpack-bundle-analyzer')
        .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
  },
  lintOnSave: false,
  publicPath: process.env.NODE_ENV === 'production'
    ? '/vue3_meituan/'
    : '/',
  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          plugins: [
            require('postcss-pxtorem')({//这里是配置项，详见官方文档
              rootValue: 37.5, // 换算的基数
            }),
          ]
        }
      }
    }
  }
})
